<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Module dev_cards</title>
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="EDoc">
</head>
<body bgcolor="white">
<div class="navbar"><a name="#navbar_top"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
<hr>

<h1>Module dev_cards</h1>
<ul class="index"><li><a href="#description">Description</a></li><li><a href="#index">Function Index</a></li><li><a href="#functions">Function Details</a></li></ul>The dev_cards module is responsible the development cards.


<h2><a name="description">Description</a></h2>The dev_cards module is responsible the development cards.
 It calculates which development card is best to play at the moment and updates which development cards that
 is hold by the player and the probabilities of getting a specific card when buying development cards.
<h2><a name="index">Function Index</a></h2>
<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#checkDevCards-3">checkDevCards/3</a></td><td>checkDevCards checks the value of playing the different development cards hold by the player.</td></tr>
<tr><td valign="top"><a href="#devCards-5">devCards/5</a></td><td>devCards receives messages from the actuator.</td></tr>
<tr><td valign="top"><a href="#init-0">init/0</a></td><td>The init function sets the probabilities for a specific development card and spawns devCards.</td></tr>
<tr><td valign="top"><a href="#moveRobberVal-5">moveRobberVal/5</a></td><td>moveRobberVal calculates the value of playing a knight, and move the robber, depending on the environment.</td></tr>
</table>

<h2><a name="functions">Function Details</a></h2>

<h3 class="function"><a name="checkDevCards-3">checkDevCards/3</a></h3>
<div class="spec">
<p><tt>checkDevCards(IDs::AgentIds, Cards, Prop::EmptyListOfProposals) -&gt; [Proposals::{CardWeCanPlay, Value}]</tt></p>
</div><p>checkDevCards checks the value of playing the different development cards hold by the player.
 The value for a specific card is dependent on the environment.
 For instance the current game phase or the amount of victory points a specific card will generate.</p>

<h3 class="function"><a name="devCards-5">devCards/5</a></h3>
<div class="spec">
<p><tt>devCards(NrMyCards, MyCards, Probs::Probabilities, Total::TotalDevCardsNotPlayed, IDs::AgentIds) -&gt; ok</tt></p>
</div><p>devCards receives messages from the actuator. It either update the development cards or call checkDevCards to send development card proposals to the actuator.</p>

<h3 class="function"><a name="init-0">init/0</a></h3>
<div class="spec">
<p><tt>init() -&gt; Pid</tt></p>
</div><p>The init function sets the probabilities for a specific development card and spawns devCards.</p>

<h3 class="function"><a name="moveRobberVal-5">moveRobberVal/5</a></h3>
<div class="spec">
<p><tt>moveRobberVal(Case::ConditionFromCheckDevCards, IDs::AgentIds, Type::BlockedResourceType, X4::ListOfVictoryPoints, VPM::MaxVictoryPoint) -&gt; MoveRobberValue</tt></p>
</div><p>moveRobberVal calculates the value of playing a knight, and move the robber, depending on the environment.</p>
<hr>

<div class="navbar"><a name="#navbar_bottom"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
<p><i>Generated by EDoc, May 20 2011, 17:57:30.</i></p>
</body>
</html>
